﻿/*
 * Created by SharpDevelop.
 * User: tdptcj
 * Date: 16/11/2011
 * Time: 9:44 
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Windows.Controls;

namespace MetaVideoEditorEvolved.ValidationRules
{
	/// <summary>
	/// Description of EmptyFieldRule.
	/// </summary>
	public class EmptyFieldRule : ValidationRule
	{
		public EmptyFieldRule()
		{
		}
		
		public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
		{
			var str = value as string;
			
			if (string.IsNullOrEmpty(str)) {
				return new ValidationResult(false, "La zone doit être remplie");
			}
			
			return ValidationResult.ValidResult;
		}
	}
}
